#include "SMPPSourceNetworkType.hpp"

using namespace smpp::pdu;

SourceNetworkType::SourceNetworkType(const quint8 nValue):
TLV(TLVtags::TAG_SOURCE_NETWORK_TYPE,1),_Value(nValue){}

SourceNetworkType::SourceNetworkType(
const SourceNetworkType &nSourceNetworkType):
TLV(nSourceNetworkType),_Value(nSourceNetworkType.getValue()){}

bool SourceNetworkType::operator ==(
	const SourceNetworkType &nSourceNetworkType) const{
	return (TLV::operator == (nSourceNetworkType) && 
			_Value == nSourceNetworkType.getValue());
}

bool SourceNetworkType::operator !=(
	const SourceNetworkType &nSourceNetworkType) const{
	return !this->operator == (nSourceNetworkType);
}

SourceNetworkType &SourceNetworkType::operator = (
	const SourceNetworkType &nSourceNetworkType){
	if(*this == nSourceNetworkType)
		return *this;
	TLV::operator = (nSourceNetworkType);
	_Value = nSourceNetworkType.getValue();
	return *this;
}

void SourceNetworkType::setValue(const quint8 nValue){
	_Value = nValue;
}

const quint8 SourceNetworkType::getValue() const{
	return _Value;
}
